<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>

description("This tests the constructor for the MediaQueryListEvent DOM class.");

// No initializer passed.
shouldBeFalse("new MediaQueryListEvent('eventType').bubbles");
shouldBeFalse("new MediaQueryListEvent('eventType').cancelable");
shouldBeEmptyString("new MediaQueryListEvent('eventType').media");
shouldBeFalse("new MediaQueryListEvent('eventType').matches");

// Bubbles and cancelable true, media and matches are missing.
shouldBeTrue("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).bubbles");
shouldBeTrue("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).cancelable");
shouldBeEmptyString("new MediaQueryListEvent('eventType').media");
shouldBeFalse("new MediaQueryListEvent('eventType').matches");

// media is passed.
shouldBeEqualToString("new MediaQueryListEvent('eventType', { media: 'string' }).media", "string");

// matches is passed.
shouldBeTrue("new MediaQueryListEvent('eventType', { matches: true }).matches");

</script>
</body>
</html>
